{% extends "layout.html" %}

{% block title %}liste des tarif mobile{% endblock %}

{% block content %}
<!-- script pour modif odre affichage -->
<script type="text/javascript"> if (window.jQuery == undefined) document.write( unescape('%3Cscript src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"%3E%3C/script%3E') );</script>
<script type="text/javascript" src="js/vendor/jquery.tablesorter.min.js"></script>
<script>
	$(function(){
  $("#myTable").tablesorter();
});
</script>
<!-- Formulaire de recherche -->
<form method="get">
<fieldset>
		<legend>Recherche d'un Tarif mobile</legend>
  
	 <div class="input-prepend">
			<input name="search-name" id="search-name" type="text" placeholder="libelle ou type" value="{{searchName}}"/>
        </div>
            
	
        <div class="input-prepend">
			<button type="submit" class="btn btn-info" name="action" value="search"><i class="icon-search icon-white"></i> Rechercher</button>
		</div>
</fieldset>
</form>
{% if not(session.niveauAuth=='7')and not(session.niveauAuth=='6') %}
<!-- Bouton de création de client -->
<fieldset>
		<legend>Creation rapide</legend>
  
            <a href="grille-tarif-mobile-creation" class="btn btn btn-primary"><i class="icon-plus-sign icon-white"></i> Créer un tarif </a>
  			

</fieldset>			
{% endif %}
<!-- Tableau listant les clients -->
<fieldset>
		<legend>Liste des Tarifs</legend>
		<table class="table table-striped tablesorter" id="myTable" >
		  <thead>
			<tr>
              <th>Libellé</th>
			  <th>Type</th>
			  <th>Tarif 1</th>
			  <th>Tarif 2</th>
			  <th>Tarif 3</th>
			  <th>Tarif 4</th>
			  <th>Tarif 5</th>
			 
            <th></th>
			</tr>
		  </thead>
		  <tbody>
			{% for offre in offres %}
			<tr>
				<td>{{offre.libelle}}</td>
				<td>{{offre.type}} </td>
				<td>{{offre.prix_1|number_format(4, '.', ' ')}} € </td>
				<td>{{offre.prix_2|number_format(4, '.', ' ')}} €</td>
				<td>{{offre.prix_3|number_format(4, '.', ' ')}} €</td>
				<td>{{offre.prix_4|number_format(4, '.', ' ')}} €</td>
				<td>{{offre.prix_5|number_format(4, '.', ' ')}} €</td>
				
                
                <td>
					<div class="btn-group">
					  <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						Actions
						<span class="caret"></span>
					  </a>
					  <ul class="dropdown-menu">
							<li><a href="grille-tarif-mobile-modification?id={{offre.id}}"><i class="icon-edit"></i> Modification</a></li>
							{% if not(session.niveauAuth=='6')and not(session.niveauAuth=='7') %}
							<li><a href="grille-tarif-mobile?action=delete&id={{offre.id}}"><i class="icon-trash"></i> Suppression</a></li>
					  		{% endif %}
					  </ul>
					</div>
				</td>
			</tr>
			{% endfor %}
		  </tbody>
		</table>
</fieldset>
    
{% endblock %}
	
